import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';

// 引入element-ui
import * as ElementUI from 'element-ui';
import 'element-ui/packages/theme-chalk/lib/index.css';
Vue.use(ElementUI);

// 引入echarts
import echarts from 'echarts';
Vue.prototype.$echarts = echarts;

Vue.config.productionTip = false;

// 引入vue-bus组件传值插件
import VueBus from 'vue-bus';
Vue.use(VueBus);
Vue.prototype.$Bus = new Vue();

// 全局filter
import filters from './filter/filters';
// 注册全局过滤器
Object.keys(filters).forEach((key) => {
  console.log('key', key);
  Vue.filter(key, filters[key]);
});

// 引入mock
import './mock/index';

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount('#app');
